A = (-6.283185307179586, 1)
B = (-3.141592653589793, 1)
f = Segment(A, B)
C = (-3.141592653589793, -1)
D = (0, -1)
g = Segment(C, D)
F = (3.141592653589793, 1)
E: (0, 1)
h = Segment(E, F)
G = (3.141592653589793, -1)
H = (6.283185307179586, -1)
i = Segment(G, H)
N = 1 (slider from 1 to 15, step 1)
S = Sum((1 / ((2 * n) - 1) * sin((((2 * n) - 1) * x))), n, 1, N)
p(x) = If[-6.283185307179586 < x < 6.283185307179586, (4 / π * S(x))]